define(['jquery'
        ,'backbone'
        ,'underscore'
        ,'models/drive',
        'collections/files'
        ,'text!templates/drives/view.html','views/files/list','jqueryui','bootstrap'],
		function($,Backbone,_,Drive,Files,driveViewTemplate,FileListView){
		var DriveView=Backbone.View.extend({
		initialize:function()
		{
			this.model=this.options.drive;
			this.files=new Files(rootFiles);
			this.fileListView=new FileListView({files:this.files});
		},
		render:function(){
			var data={
				model:this.model,
				_:_
			};		
			var cTemplate=_.template(driveViewTemplate,data);			
			this.$el.html(cTemplate);
			//FileListView
			this.fileListView.setElement($(".drive-filelist"));
			this.fileListView.render();	
			return this;
		}
	});	
	return  DriveView;
});